package nanzhuli.user.svc.util.conf;

import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

public class ServiceNameConnection implements Condition {

	@Override
	public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
		String m = context.getEnvironment().getProperty("nanzhuli.serviceCallMethod");
		return StringUtils.isBlank(m) || m.contains("ServiceName");
	}

}